/*
 * ****************************************************************************
 * Copyright: 2020-2030, YZChain Tech. Co., Ltd.
 * File name:
 * Description:
 * Author: Dc luo
 * Version: v1.0
 * Date: $DATE
 * History:
 * ***************************************************************************
 */

package com.srp.blockchain.bcos.utils.constants;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Contract {

    public static final String NAME_USERS = "UserTable";
    public static final String NAME_HOUSES = "HouseTable";
    public static final String NAME_ORDERS = "OrderTable";
    public static final String NAME_ASSETS = "Assets";
    public static final String NAME_WATCH = "WatchTable";
    public static final String NAME_VOTE = "VoteTable";
    public static final String NAME_HOUSE_APPR = "HouseAppr";
    public static final String NAME_ISSUES = "Issues";
    public static final String NAME_ORDER_EXEC = "OrderExec";


    public static final String ADDRESS_USERS = "0xd8aa353d5c4e7680d364b7138ea5531d55b26821";
    public static final String ADDRESS_HOUSES = "0xc7e53b09d0aed9256ff79165a37806dff1150755";
    public static final String ADDRESS_ORDERS = "0x0107e3780ba220b2c3f428b06c74fd938ab9a8de";
    public static final String ADDRESS_ASSETS = "0xbf21d112f961606d82214392e6bad089e3bc2432";
    public static final String ADDRESS_WATCH = "0x756d9dc0f5ec350878909b1446b0febb9b19785b";
    public static final String ADDRESS_VOTE = "0x38b3272d4a03c0c45f8386d5c363d33f8ab433aa";

    // 用户身份
    public static final Integer USER_ROLE_TENANT = 0;       // 租客
    public static final Integer USER_ROLE_LANDLORD = 1;     // 房东
    public static final Integer USER_ROLE_AGENCY = 2;       // 代理商
    public static final Integer USER_ROLE_SUPER = 3;        // 监管方
    public static final Integer USER_ROLE_PLATFORM = 4;     // 平台方

    // 用户状态
    public static final Integer USER_STATUS_OK = 0;         // 正常
    public static final Integer USER_STATUS_FROZEN = 1;     // 冻结
    public static final Integer USER_STATUS_REVOKE = 2;     // 吊销

    // 订单状态
    public static final Integer ORDER_STATUS_WAITING = 0;   // 等待确认
    public static final Integer ORDER_STATUS_CONFIRMED = 1; // 已确认
    public static final Integer ORDER_STATUS_RUNNING = 2;   // 正在进行
    public static final Integer ORDER_STATUS_ENDED = 3;     // 已完成

    // 房源状态
    public static final Integer HOUSE_STATUS_FREE = 0;     // 闲置
    public static final Integer HOUSE_STATUS_RENTED = 1;   // 在租
    public static final Integer HOUSE_STATUS_REVOKE = 2;   // 失效

    // 投票类型
    public static final Integer VOTE_TYPE_HOUSE = 1;   // 房源信息评级
    public static final Integer VOTE_TYPE_WATCH = 2;   // 看房评分
    public static final Integer VOTE_TYPE_RENT = 3;    // 租房评价
    public static final Integer VOTE_TYPE_ISSUE = 4;   // 纠纷仲裁

    // 合约状态
    public static final Integer INSTANCE_DEPLOY_NONE = 1;  //未部署
    public static final Integer INSTANCE_DEPLOY_SUCCESS = 2;  //已部署
    public static final Integer INSTANCE_DEPLOY_FAILEED = 3;  //部署失败
    public static final Integer INSTANCE_STATE_RUNNING = 4;  //正在运行
    public static final Integer INSTANCE_STATE_DESTROY = 5;  //已销毁、结束

    // 租期状态
    public static final int RENT_STATE_NORMAL = 0x00;     // 正常
    public static final int RENT_STATE_READY_EXPIRED = 0x01;     // 即将超期
    public static final int RENT_STATE_EXPIRED = 0x02;     // 已经超期
    public static final int RENT_STATE_FINISH_CONFIRM = 0x04;     // 宽限期完成
    public static final int RENT_STATE_FINISHED = 0x08;     // 订单完成


}

